{% extends 'manage.html' %}
{% load static %}
{% block title %}
    设置
{% endblock %}

{% block css %}
    <style>
        .content {
            margin: 10px 150px;
        }

        .list_header {
            font-weight: bold;
        }
        .msg{
            color: red !important;
        }
    </style>
{% endblock %}


{% block content %}
    <div class="content">
        <div class="row">
            <div class="col-2">
                <a class="list-group-item list-group-item-action list_header">个人中心</a>
                <div class="list-group" id="list-tab" role="tablist">
                    <a class="list-group-item list-group-item-action active" id="list-home-list" data-toggle="list"
                       href="#list-home" role="tab" aria-controls="home">我的资料</a>
                    <a class="list-group-item list-group-item-action" id="list-editpassword-list" data-toggle="list"
                       href="#list-editpassword" role="tab" aria-controls="editpassword">修改密码</a>
                    <a class="list-group-item list-group-item-action" id="list-delete-list" data-toggle="list"
                       href="#list-delete" role="tab"
                       aria-controls="delete">删除项目</a>
                </div>
            </div>
            <div class="col-8">
                <div class="tab-content" id="nav-tabContent">
                    <div class="tab-pane fade show active" id="list-home" role="tabpanel"
                         aria-labelledby="list-home-list">
                        我的资料
                    </div>
                    <div class="tab-pane fade" id="list-editpassword" role="tabpanel"
                         aria-labelledby="list-editpassword-list">
                        修改密码
                    </div>
                    <div class="tab-pane fade" id="list-delete" role="tabpanel"
                         aria-labelledby="list-delete-list">
                        <div class="card">
                            <h5 class="card-header">删除项目</h5>
                            <div class="card-body">
                                <form action="{% url 'manage:project_delete' project_id=request.tracer.project.id %}" method="post">
                                    {% csrf_token %}
                                    <div class="form-group">
                                        <label for="exampleInputProject">项目名称</label>
                                        <input type="text" class="form-control" id="exampleInputProject"
                                               aria-describedby="ProjectHelp" placeholder="请输入项目名称" name="project_name">
                                        <span class="error-msg">{{ error }}</span>
                                        <small id="Project" class="form-text text-muted msg">是否确定删除项目，删除后项目将无法被找回</small>
                                    </div>
                                    <button type="submit" class="btn btn-primary" >确定</button>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

{% endblock %}

{% block js %}

{% endblock %}